from math import sqrt,pi,atan,cos,sin

def CartesianToPolar():
    x=input("Enter x:")
    y=input("Enter y:")
    r=sqrt(pow(x,2)+pow(y,2))
    t=(atan(float(y)/x)*180)/pi
    print"The polar coordinate is (%s,%s deg)"%(r,t)

def PolarToCartesian():
    r=input("Enter r:")
    t=input("Enter angle in degree:")
    x=r*cos((t*pi)/180.0)
    y=r*sin((t*pi)/180.0)
    print"The cartesian coordinate is (%s,%s)"%(x,y)

